package com.example.tianyidemo.Mapper;
import com.example.tianyidemo.pojo.Circle;
import com.example.tianyidemo.pojo.Section;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
//获取圈子版块数据
public interface SectionAndCircleMapper {
    @Select("select s.sectionID, s.sectionName, s.adimgone,s.adimgonetitle,s.adimgtwo,s.adimgtwotitle from section s ")
    List<Section> getSectionAndCircle();

    @Select("SELECT * FROM circle WHERE sectionID = #{sectionID}")  // 修改参数类型如果需要的话
    List<Circle> getCirclesBySectionId(@Param("sectionID") Integer sectionID);  // 使用@Param注解来传递参数名
}
